using System;
using System.Collections.Generic;
using SheLife.Domain.Common;

namespace SheLife.Domain.Entities
{
    /// <summary>
    /// 成长相关实体类
    /// </summary>
    public class Growth : BaseEntity
    {
        public string Name { get; set; } = string.Empty;
        public string Description { get; set; } = string.Empty;
        public string Icon { get; set; } = string.Empty;
        public int SortOrder { get; set; }
        public bool IsEnabled { get; set; }
    }

    /// <summary>
    /// 成长档案实体
    /// </summary>
    public class GrowthArchive : BaseEntity
    {
        public int UserId { get; set; }
        public string ArchiveName { get; set; } // 档案名称
        public string Description { get; set; } // 描述
        public string Category { get; set; } // 分类：健康、生活、美丽、成长等
        public DateTime StartDate { get; set; } // 开始日期
        public DateTime? EndDate { get; set; } // 结束日期
        public string CoverImage { get; set; } // 封面图片
        public bool IsPublic { get; set; } // 是否公开
        public bool IsFeatured { get; set; } // 是否精选
        public int ViewCount { get; set; } // 查看次数
        public int LikeCount { get; set; } // 点赞次数
        public string Tags { get; set; } // 标签
        public string Notes { get; set; } // 备注

        // 导航属性
        public virtual User User { get; set; }
        public virtual ICollection<GrowthArchiveItem> GrowthArchiveItems { get; set; }
    }

    /// <summary>
    /// 成长档案项目实体
    /// </summary>
    public class GrowthArchiveItem : BaseEntity
    {
        public int ArchiveId { get; set; }
        public string ItemType { get; set; } // 项目类型：目标、习惯、健康记录、穿搭等
        public int ItemId { get; set; } // 项目ID
        public string ItemName { get; set; } // 项目名称
        public string ItemDescription { get; set; } // 项目描述
        public string ItemImageUrl { get; set; } // 项目图片URL
        public DateTime ItemDate { get; set; } // 项目日期
        public string Notes { get; set; } // 备注
        public int SortOrder { get; set; } // 排序

        // 导航属性
        public virtual GrowthArchive GrowthArchive { get; set; }
    }

    /// <summary>
    /// 情绪日记实体
    /// </summary>
    public class EmotionDiary : BaseEntity
    {
        public int UserId { get; set; }
        public string Title { get; set; } // 标题
        public string Content { get; set; } // 内容
        public string Mood { get; set; } // 心情
        public int MoodLevel { get; set; } // 心情等级：1-5
        public string EmotionTags { get; set; } // 情绪标签
        public DateTime DiaryDate { get; set; } // 日记日期
        public bool IsPrivate { get; set; } // 是否私密
        public bool IsPublic { get; set; } // 是否公开
        public int ViewCount { get; set; } // 查看次数
        public int LikeCount { get; set; } // 点赞次数
        public string ImageUrls { get; set; } // 图片URLs，多个用逗号分隔
        public string Tags { get; set; } // 标签

        // 导航属性
        public virtual User User { get; set; }
        public virtual ICollection<EmotionDiaryComment> EmotionDiaryComments { get; set; }
        public virtual ICollection<EmotionDiaryLike> EmotionDiaryLikes { get; set; }
    }

    /// <summary>
    /// 情绪日记评论实体
    /// </summary>
    public class EmotionDiaryComment : BaseEntity
    {
        public int DiaryId { get; set; }
        public int UserId { get; set; }
        public string Content { get; set; } // 内容
        public DateTime CommentDate { get; set; } // 评论日期

        // 导航属性
        public virtual EmotionDiary EmotionDiary { get; set; }
        public virtual User User { get; set; }
    }

    /// <summary>
    /// 情绪日记点赞实体
    /// </summary>
    public class EmotionDiaryLike : BaseEntity
    {
        public int DiaryId { get; set; }
        public int UserId { get; set; }
        public DateTime LikeDate { get; set; } // 点赞日期

        // 导航属性
        public virtual EmotionDiary EmotionDiary { get; set; }
        public virtual User User { get; set; }
    }

    /// <summary>
    /// 成长课程实体
    /// </summary>
    public class GrowthCourse : BaseEntity
    {
        public string CourseName { get; set; } // 课程名称
        public string Description { get; set; } // 描述
        public string Category { get; set; } // 分类：健康、生活、美丽、成长等
        public string Instructor { get; set; } // 讲师
        public decimal Price { get; set; } // 价格
        public decimal OriginalPrice { get; set; } // 原价
        public string CoverImage { get; set; } // 封面图片
        public string VideoUrl { get; set; } // 视频URL
        public int Duration { get; set; } // 时长（分钟）
        public int LessonCount { get; set; } // 课时数
        public int StudentCount { get; set; } // 学生数
        public decimal Rating { get; set; } // 评分
        public int ReviewCount { get; set; } // 评论数
        public bool IsRecommended { get; set; } // 是否推荐
        public bool IsFeatured { get; set; } // 是否精选
        public string Tags { get; set; } // 标签

        // 导航属性
        public virtual ICollection<GrowthCourseLesson> GrowthCourseLessons { get; set; }
        public virtual ICollection<UserGrowthCourse> UserGrowthCourses { get; set; }
        public virtual ICollection<GrowthCourseReview> GrowthCourseReviews { get; set; }
    }

    /// <summary>
    /// 成长课程课时实体
    /// </summary>
    public class GrowthCourseLesson : BaseEntity
    {
        public int CourseId { get; set; }
        public string LessonName { get; set; } // 课时名称
        public string Description { get; set; } // 描述
        public int Duration { get; set; } // 时长（分钟）
        public string VideoUrl { get; set; } // 视频URL
        public string Notes { get; set; } // 笔记
        public int SortOrder { get; set; } // 排序
        public bool IsFree { get; set; } // 是否免费

        // 导航属性
        public virtual GrowthCourse GrowthCourse { get; set; }
        public virtual ICollection<UserGrowthCourseProgress> UserGrowthCourseProgresses { get; set; }
    }

    /// <summary>
    /// 用户成长课程关联实体
    /// </summary>
    public class UserGrowthCourse : BaseEntity
    {
        public int UserId { get; set; }
        public int CourseId { get; set; }
        public decimal PurchasePrice { get; set; } // 购买价格
        public DateTime PurchaseDate { get; set; } // 购买日期
        public DateTime? StartDate { get; set; } // 开始日期
        public DateTime? CompleteDate { get; set; } // 完成日期
        public decimal Progress { get; set; } // 进度百分比
        public string Status { get; set; } // 状态：未开始、进行中、已完成
        public bool IsFavorite { get; set; } // 是否收藏
        public int Rating { get; set; } // 评分：1-5
        public string Review { get; set; } // 评论

        // 导航属性
        public virtual User User { get; set; }
        public virtual GrowthCourse GrowthCourse { get; set; }
        public virtual ICollection<UserGrowthCourseProgress> UserGrowthCourseProgresses { get; set; }
    }

    /// <summary>
    /// 用户成长课程进度实体
    /// </summary>
    public class UserGrowthCourseProgress : BaseEntity
    {
        public int UserId { get; set; }
        public int CourseId { get; set; }
        public int LessonId { get; set; }
        public DateTime? StartDate { get; set; } // 开始日期
        public DateTime? CompleteDate { get; set; } // 完成日期
        public int WatchDuration { get; set; } // 观看时长（秒）
        public bool IsCompleted { get; set; } // 是否完成

        // 导航属性
        public virtual User User { get; set; }
        public virtual GrowthCourse GrowthCourse { get; set; }
        public virtual GrowthCourseLesson GrowthCourseLesson { get; set; }
    }

    /// <summary>
    /// 成长课程评价实体
    /// </summary>
    public class GrowthCourseReview : BaseEntity
    {
        public int CourseId { get; set; }
        public int UserId { get; set; }
        public int Rating { get; set; } // 评分：1-5
        public string Review { get; set; } // 评论
        public DateTime ReviewDate { get; set; } // 评价日期

        // 导航属性
        public virtual GrowthCourse GrowthCourse { get; set; }
        public virtual User User { get; set; }
    }
}